// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env:"yiliaojiufeng-6gt0kj1l1df8b7b7",
  traceUser: true,
})
const db =cloud.database()

exports.main = async (event, context) => {
    try {
      return await db.collection('comment').where({
          _id: event.commentId,
      }).remove()
    } catch(e) {
      console.error(e)
    }
  }